﻿namespace AspAuthentication.Interfaces
{
    /// <summary>
    /// Defines the contract which any implementation of IFormsAuthenticationProvider must satisfy
    /// </summary>
    public interface IFormsAuthenticationProvider
    {
        /// <summary>
        /// Signs the out.
        /// </summary>
        void SignOut();
        /// <summary>
        /// Sets the auth cookie.
        /// </summary>
        /// <param name="userName">Name of the user.</param>
        /// <param name="createPersistentCookie">if set to <c>true</c> [create persistent cookie].</param>
        void SetAuthCookie(string userName, bool createPersistentCookie);
        /// <summary>
        /// Hashes the password for storing in config file.
        /// </summary>
        /// <param name="password">The password.</param>
        /// <param name="formsAuthPasswordFormat">The forms auth password format.</param>
        /// <returns></returns>
        string HashPasswordForStoringInConfigFile(string password, string formsAuthPasswordFormat);
    }
}